package nina.yiyou.performance.s10init.compute

import nina.yiyou.salary.process.salary.ComputeMapMaker

class S1ComputeMapMaker {

  S1ComputeMapMaker(Map basicMap) {
    _basicMap = basicMap
  }

  Map make() {
//    Map subordinateMap = makeSubordinateMap()

    return new ComputeMapMaker([
        [_basicMap, this.&computeBasic],
    ]).make()
  }

  private Map makeSubordinateMap() {
    return _basicMap.values()
        .groupBy { it['直属上级'] }
        .collectEntries { [it['工号'], it] }
  }

  private final Map _basicMap
}
